<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

	<h:form>
    <p:menu style="width: 90%; float: left;">
      <p:submenu label="Sua área" rendered="#{!usuarioAction.logado}">  
        <p:menuitem value="Cadastrar" action="#{usuarioAction.prepararCadastro}" icon="ui-icon-document" ajax="false" />
        <p:menuitem value="Acessar" action="#{loginAction.prepararLogin}" icon="ui-icon-key" ajax="false" />
      </p:submenu>  
      <p:submenu label="Sua área" rendered="#{usuarioAction.logado and !usuarioAction.administrador}">
        <p:menuitem value="Home" action="#{usuarioAction.iniciar}" icon="ui-icon-home"/>
        <p:menuitem value="Alterar dados" action="#{usuarioAction.prepararAlteracaoDados}" icon="ui-icon-person" ajax="false" />
        <p:menuitem value="Alterar senha" action="#{usuarioAction.prepararAlteracaoSenha}" icon="ui-icon-key" ajax="false" />
        <p:menuitem value="Simulados" action="#{simuladoUsuarioAction.listar}" icon="ui-icon-star" ajax="false" />
        <p:menuitem value="Mensagens" action="#{mensagemAction.iniciar}" icon="ui-icon-comment" ajax="false" />
        <p:menuitem value="Sair" action="#{loginAction.executarLogout}" icon="ui-icon-power" ajax="false" />
      </p:submenu>  
      <p:submenu label="Sua área" rendered="#{usuarioAction.logado and usuarioAction.administrador}">
        <p:menuitem value="Alterar dados" action="#{usuarioAction.prepararAlteracaoDados}" icon="ui-icon-gear" ajax="false" />
        <p:menuitem value="Alterar senha" action="#{usuarioAction.prepararAlteracaoSenha}" icon="ui-icon-key" ajax="false" />
        <p:menuitem value="Usuarios" action="#{adminUsuarioAction.listar}" icon="ui-icon-person" ajax="false" />
        <p:menuitem value="Instituições" action="#{adminInstituicaoAction.listar}" icon="ui-icon-wrench" ajax="false" />
        <p:menuitem value="Orgãos" action="#{adminOrgaoAction.listar}" icon="ui-icon-wrench" ajax="false" />
        <p:menuitem value="Cargos" action="#{adminCargoAction.listar}" icon="ui-icon-wrench" ajax="false" />
        <p:menuitem value="Materias" action="#{adminMateriaAction.listar}" icon="ui-icon-wrench" ajax="false" />
        <p:menuitem value="Concursos" action="#{adminConcursoAction.listar}" icon="ui-icon-wrench" ajax="false" />
        <p:menuitem value="Simulados" action="#{adminSimuladoModeloAction.listar}" icon="ui-icon-wrench" ajax="false" />
        <p:menuitem value="Sair" action="#{loginAction.executarLogout}" icon="ui-icon-power" ajax="false" />
      </p:submenu>  
      <p:submenu label="Suporte">  
        <p:menuitem value="Ajuda" actionListener="#{buttonBean.delete}" icon="ui-icon-help" ajax="false" />
        <p:menuitem value="F.A.Q." actionListener="#{buttonBean.delete}" icon="ui-icon-lightbulb" ajax="false" />
        <p:menuitem value="Contato" actionListener="#{buttonBean.delete}" icon="ui-icon-mail-closed" ajax="false" />
      </p:submenu>  
      <p:submenu label="Noticias">
        <p:menuitem value="TouchFaces" url="/touch" icon="ui-icon-star"/>
      </p:submenu>  
    </p:menu>
    </h:form>

</html>
